<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div>
        <input id="num1" />
        +
        <input id="num2" />
        <input type="button" value="=" onclick="add()" />
        <input id="num3" />
    </div>
    <div>
        <input />
        -
        <input />
        <input type="button" value="=" onclick="sub()" />
        <div>
            <input id="num1" />
            +
            <input id="num2" />
            <input type="button" value="=" onclick="mul()" />
            <input id="num3" />
        </div>

        <div>
            <input id="num1" />
            *
            <input id="num2" />
            <input type="button" value="=" onclick="div()" />
            <input id="num3" />
        </div>
        <div>
            <input id="num1" />
            /
            <input id="num2" />
            <input type="button" value="=" />
            <input id="num3" />
        </div>
        <script>
            function add() {
                num3.value = parseInt(num1.value) + parseInt(num2.value);
            }
            function sub() {
                num3.value = parseInt(num1.value) - parseInt(num2.value);
            }
            function mul() {
                num3.value = parseInt(num1.value) + parseInt(num2.value);
            }
            function div() {
                num3.value = parseInt(num1.value) + parseInt(num2.value);
            }
        </script>
    </div>
</body>

</html>